<template>
  <div>
    <TypeNav />
    <List />
    <Recommend />
    <Rank />
    <Like />
    <Floor v-for="item in floorList" :key="item.id" :floorItem="item" />
    <Brand />
  </div>
</template>

<script>
import List from "@pages/Home/components/List";
import Recommend from "@pages/Home/components/Recommend";
import Rank from "@pages/Home/components/Rank";
import Like from "@pages/Home/components/Like";
import Floor from "@pages/Home/components/Floor";
import Brand from "@pages/Home/components/Brand";
import { reqFloorList } from "@/api";
export default {
  name: "Home",
  components: {
    List,
    Recommend,
    Rank,
    Like,
    Floor,
    Brand,
  },
  data() {
    return {
      floorList: [],
    };
  },
  methods: {
    async getFloorList() {
      try {
        const re = await reqFloorList();
        // console.log(re, "re");
        this.floorList = re;
      } catch (e) {
        alert(e.message);
      }
    },
  },
  mounted() {
    this.getFloorList();
  },
};
</script>

<style>
</style>